# y=10cos(4x)+7sin(5x)
from math import *
import random

def f(x):
    y = 10*cos(4*x)+7*sin(5*x) 
    return y

def get_gradient(func,x,esp=1e-5,sig=True):
    grad=func(x+esp)-func(x)
    if sig: return int(grad/abs(grad)) if grad!=0 else 0
    return grad/esp

s = 0
i = 0

while(i<=100):
    rand = 2*get_gradient(f,s)*random.random()
    r = s+rand
    if f(r)>f(s):
        s = r
    i+=1

print(f'({s},{f(s)})')

#not completed